﻿Jxstar.currentPage = function() {
	var config = {param:{},initpage:function(page, define){},eventcfg:{}};

	var auditData = Jxstar.findComboData('audit');

	var cols = [
	{col:{header:'记录状态', width:100, sortable:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: auditData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: auditData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < auditData.length; i++) {
				if (auditData[i][0] == value)
					return auditData[i][1];
			}
		}}, field:{name:'price_info__auditing',type:'string'}},
	{col:{header:'*材料名称', width:100, sortable:true, editable:true, hcss:'color:#0000ff;',
		editor:new Ext.form.TextField({
			maxLength:150, allowBlank:false
		})}, field:{name:'price_info__mat_name',type:'string'}},
	{col:{header:'材料类别', width:100, sortable:true}, field:{name:'price_info__mat_type',type:'string'}},
	{col:{header:'*单位', width:100, sortable:true, editable:true, hcss:'color:#0000ff;',
		editor:new Ext.form.TextField({
			maxLength:10, allowBlank:false
		})}, field:{name:'price_info__mat_unit',type:'string'}},
	{col:{header:'*规格型号', width:100, sortable:true, editable:true, hcss:'color:#0000ff;',
		editor:new Ext.form.TextField({
			maxLength:50, allowBlank:false
		})}, field:{name:'price_info__mat_size',type:'string'}},
	{col:{header:'*单价（元）', width:100, sortable:true, align:'right',
		editable:true, hcss:'color:#0000ff;',
		editor:new Ext.form.NumberField({
			maxLength:12, allowBlank:false
		}),renderer:JxUtil.formatInt()}, field:{name:'price_info__mat_price',type:'int'}},
	{col:{header:'产地', width:100, sortable:true, editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.TextField({
			maxLength:50
		})}, field:{name:'price_info__mat_factory',type:'string'}},
	{col:{header:'品牌', width:100, sortable:true, editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.TextField({
			maxLength:100
		})}, field:{name:'price_info__mat_brand',type:'string'}},
	{col:{header:'材质', width:100, sortable:true, editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.TextField({
			maxLength:50
		})}, field:{name:'price_info__mat_stuff',type:'string'}},
	{col:{header:'使用项目', width:100, sortable:true, editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.TextField({
			maxLength:500
		})}, field:{name:'price_info__project_name',type:'string'}},
	{col:{header:'供应商', width:100, sortable:true, editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.TextField({
			maxLength:50
		})}, field:{name:'price_info__mat_provider',type:'string'}},
	{col:{header:'联系人', width:100, sortable:true, editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.TextField({
			maxLength:50
		})}, field:{name:'price_info__contact_person',type:'string'}},
	{col:{header:'联系电话', width:100, sortable:true, editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.TextField({
			maxLength:50
		})}, field:{name:'price_info__tel_number',type:'string'}},
	{col:{header:'上传单位', width:100, sortable:true}, field:{name:'price_info__dept_name',type:'string'}},
	{col:{header:'上传人', width:100, sortable:true}, field:{name:'price_info__upload_user',type:'string'}},
	{col:{header:'上传日期', width:100, sortable:true, renderer:function(value) {
			return value ? value.format('Y-m-d') : '';
		}}, field:{name:'price_info__upload_date',type:'date'}},
	{col:{header:'类别编码', width:100, sortable:true}, field:{name:'price_info__type_code',type:'string'}},
	{col:{header:'部门id', width:100, sortable:true, hidden:true}, field:{name:'price_info__dept_id',type:'string'}},
	{col:{header:'上传人id', width:100, sortable:true, hidden:true}, field:{name:'price_info__upload_userid',type:'string'}},
	{col:{header:'类别id', width:100, sortable:true, hidden:true}, field:{name:'price_info__mat_type_id',type:'string'}},
	{col:{header:'主键', width:100, sortable:true, hidden:true}, field:{name:'price_info__price_info_id',type:'string'}},
	{col:{header:'备注', width:100, sortable:true, editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.TextField({
			maxLength:200
		})}, field:{name:'price_info__memo',type:'string'}}
	];
	
	config.param = {
		cols: cols,
		sorts: null,
		hasQuery: '1',
		isedit: '1',
		isshow: '1',
		funid: 'price_info'
	};
	
	
	
		
	return new Jxstar.GridNode(config);
}